package com.froggyware.tadpole;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: mst
 * Date: Sep 5, 2011
 * Time: 5:12:23 PM
 */
@JsonIgnoreProperties({"new"})
public abstract class TadObject<T extends TadObject> {

    private String id;

    /**
     * Returns the tad id of this object.
     * @return
     */
    public String getId() {
        return id;
    }

    protected void setId(String id) {
        this.id = id;
    }
/**
    public T load(String id) {
        return Tadpole.load(id);
    }
*/
    /**
     * Returns if this object is already persisted or not.
     * @return
     *
     */
    public boolean isNew() {
        return id == null;
    }


}
